package me.xingyannian.hope.repository;

import me.xingyannian.hope.entity.Menu;
import me.xingyannian.hope.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface MenuRepository extends JpaRepository<Menu, Integer>, JpaSpecificationExecutor<Menu> {
    Boolean existsMenuByTitle(String title);

    Menu getMenuByTitle(String string);


    List<Menu> getMenusByRolesIn(List<Role> roles);

    Set<Menu> getMenusByRolesIn(Set<Role> roles);
}